<?php
$isReloadable = true;
$isPopUp = true;
require_once("../../pers/inc.config.php");
require_once(OVF_FS_WEB_ROOT.'/app/_inc/inc.session.php');
require_once(OVF_FS_WEB_ROOT.'/app/_inc/funct.html.php');
require_once(OVF_FS_WEB_ROOT.'/app/_inc/funct.rss.php');

$aArticoli = ovfGetRss($objSess->aRssUrl);

$sCmdL  = "";

$sCmdR  = "&nbsp;&nbsp;&nbsp";
$sCmdR .=  "<a class='cmd1' href='javascript:window.close();'>"._t("chiudi")."</a>";
$aOpt = array("width"=>600);
echo getTestaPopUpHtml("NEWS",$msgPag, $aOpt);
?>
<script type="text/javascript">
function confAgg() {
	if (confirm("<?=_t("Confermi l'aggiornamento della struttura del data-base ?")?>")) {
		document.frm1.azione.value='aggiorna';
		document.frm1.submit();
	}
}
</script>
<table border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="left" valign='bottom'>
         <? echo $sCmdL;?>
      </td>
      <td class="cmd1" align="right" valign='bottom'>
         <? echo $sCmdR;?>
      </td>
   </tr>
</table>
<table class="tab1" border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
<?php 
$sTxtX = 'txt1';
foreach ($aArticoli as $kX => $aArt) {
	$sTxtX = ($sTxtX=='txt1')?'txt2':'txt1';
?>
	<tr>
		<td class="<?php echo $sTxtX?>" >
			<div><?php echo date("d/m/Y H:i",$aArt['dataOra'])." - "
				."<a href='".$aArt['fonte_link']."' target='_blank' class='$sTxtX'>".$aArt['fonte']."</a>";?>
			</div>
			<div style='font-weight:bold;'><?php 
				echo "<a href='".$aArt['link']."' target='_blank' class='$sTxtX'>".$aArt['titolo']."</a>";?></div>
			<div><?php echo $aArt['testo'];?></div>
		</td>
	</tr>
<?php 
}
?>
</table>
<table border="0" cellpadding="3" cellspacing="1" width="100%" align='center'>
   <tr>
      <td class="cmd1" align="left" valign='bottom'>
         <? echo $sCmdL;?>
      </td>
      <td class="cmd1" align="right" valign='bottom'>
         <? echo $sCmdR;?>
      </td>
   </tr>
</table>
<?php 
//print_r($aArt);
echo getCodaPopUpHtml();